package world.square;


import static org.junit.Assert.*;

import java.math.BigDecimal;

import org.junit.Test;

public class TemperatureScaleTest { 

	@Test 
	public void getSymbol_CELCIUS() {
		assertEquals('C',TemperatureScale.CELCIUS.getScaleSymbol());
	}

	@Test 
	public void getSymbol_KELVIN() {
		assertEquals('K',TemperatureScale.KELVIN.getScaleSymbol());
	}

	@Test 
	public void getSymbol_FAHRENHEIT() {
		assertEquals('F',TemperatureScale.FAHRENHEIT.getScaleSymbol());
	}

	@Test
	public void convertToScale_legalCase(){
		assertEquals(new BigDecimal("273.15"),TemperatureScale.CELCIUS.convertToScale(new BigDecimal("0"), TemperatureScale.KELVIN));
		assertEquals(0,TemperatureScale.FAHRENHEIT.convertToScale(new BigDecimal("32"), TemperatureScale.CELCIUS).intValue());
	}
}
